﻿@model Coleotrack.Areas.Admin.Models.ProjectViewModel
@using Coleotrack.Resources

    @using (Html.BeginForm()) {
        @Html.ValidationSummary(false, labels.ErrorsOccured)
            
            @Html.HiddenFor(x => x.Project.Id)

            <br />
            <div class="editor-label required">                
                @Html.LabelFor(x => x.Project.Abbreviation)
                <p class="description">The abbreviation of your project. Used for better identification in issue list.</p>
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(x => x.Project.Abbreviation)
            </div>
        
            <br />
            <div class="editor-label required">                
                @Html.LabelFor(x => x.Project.Name)
                <p class="description">The title of your project.</p>
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(x => x.Project.Name)
            </div>
            
            <br />
            <div class="editor-label">
                Description
                <p class="description">The description of your project. Describe your project for the team members.</p>
            </div>
            <div class="editor-field">
                @Html.TextAreaFor(x => x.Project.Description)
            </div>
            
            <br />

            <div class="editor-label required">
                Contact
                <p class="description">Who is the contact person of the project?</p>
            </div>
            <div class="editor-field">
                @Html.DropDownList("contactPerson", new SelectList(Model.Users, "Id", "Name", Model.Project.ContactPerson.Id))
            </div>

            <div class="commands">
                <div class="submit">
                @if (Model.Project.Id > 0)
                { 
                    <input type="submit" value="Edit" />
                }
                else
                { 
                    <input type="submit" value="Create" />
                } 
                </div>
                
                <div class="cancel">
                    @Html.ActionLink("Cancel", "Index", null, new { @class = "cancel" })
                </div>
                </div>
     } 
